﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace A2DFramework.AOPService
{
    public class Interceptor
    {
        public object Invoke(object obj, string methodName, object[] parameters)
        {
            Console.WriteLine(string.Format("before invoke {0}...", methodName));
            var retObj = obj.GetType().GetMethod(methodName).Invoke(obj, parameters);
            Console.WriteLine(string.Format("after invoke {0}...", methodName));
            return retObj;
        }
    }
}
